package com.vdimitr.happycube.puzzle.solution.output.translation;

/**
 * This class is responsible for translating '1' to 'o' and '0' to ' ' (space)
 * 
 * @author vasileios.dimitriadis
 * 
 */
public class PuzzlePieceMatrixValueZeroOneTranslator implements
		IPuzzlePieceMatrixValueTranslator {

	/**
	 * The translation of 1
	 */
	public static final String OMIKRON = "o";

	/**
	 * The translation of 0
	 */
	public static final String SPACE = " ";

	public String translateToString(int value) {
		if (value == 1 || value == 0) {
			return value == 1 ? OMIKRON : SPACE;
		} else {
			throw new IllegalArgumentException("Cannot translate:" + value
					+ ", only translating 0 and 1");
		}
	}

}
